package com.ruoyi.dispatch.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dispatch.mapper.CoalSeamMapper;
import com.ruoyi.dispatch.domain.CoalSeam;
import com.ruoyi.dispatch.service.ICoalSeamService;

/**
 * 煤层信息Service业务层处理
 * 
 * @author wuxiaofang
 * @date 2025-04-02
 */
@Service
public class CoalSeamServiceImpl implements ICoalSeamService 
{
    @Autowired
    private CoalSeamMapper coalSeamMapper;

    /**
     * 查询煤层信息
     * 
     * @param coalSeamId 煤层信息主键
     * @return 煤层信息
     */
    @Override
    public CoalSeam selectCoalSeamByCoalSeamId(Long coalSeamId)
    {
        return coalSeamMapper.selectCoalSeamByCoalSeamId(coalSeamId);
    }

    /**
     * 查询煤层信息列表
     * 
     * @param coalSeam 煤层信息
     * @return 煤层信息
     */
    @Override
    public List<CoalSeam> selectCoalSeamList(CoalSeam coalSeam)
    {
        return coalSeamMapper.selectCoalSeamList(coalSeam);
    }

    /**
     * 新增煤层信息
     * 
     * @param coalSeam 煤层信息
     * @return 结果
     */
    @Override
    public int insertCoalSeam(CoalSeam coalSeam)
    {
        coalSeam.setCreateTime(DateUtils.getNowDate());
        return coalSeamMapper.insertCoalSeam(coalSeam);
    }

    /**
     * 修改煤层信息
     * 
     * @param coalSeam 煤层信息
     * @return 结果
     */
    @Override
    public int updateCoalSeam(CoalSeam coalSeam)
    {
        coalSeam.setUpdateTime(DateUtils.getNowDate());
        return coalSeamMapper.updateCoalSeam(coalSeam);
    }

    /**
     * 批量删除煤层信息
     * 
     * @param coalSeamIds 需要删除的煤层信息主键
     * @return 结果
     */
    @Override
    public int deleteCoalSeamByCoalSeamIds(Long[] coalSeamIds)
    {
        return coalSeamMapper.deleteCoalSeamByCoalSeamIds(coalSeamIds);
    }

    /**
     * 删除煤层信息信息
     * 
     * @param coalSeamId 煤层信息主键
     * @return 结果
     */
    @Override
    public int deleteCoalSeamByCoalSeamId(Long coalSeamId)
    {
        return coalSeamMapper.deleteCoalSeamByCoalSeamId(coalSeamId);
    }
}
